package com.budwk.app.sqfwV2.enums;

import lombok.Getter;

/**
 * @BelongsProject: dfxy-shequ
 * @Author: yangweimin
 * @CreateTime: 2024-01-31  16:24
 * @Description: TODO
 */
@Getter
public enum RedWhiteExcel {

    WHITE_SELF_CATERING_STATISTICS("3", "云岩区自办酒席情况统计","云岩区自办酒席情况统计表", "/preview/red-white/dayinglu-tpl-3.jpg"),
    WHITE_WORK_PROMOTION("4", "大营路街道“治风”工作推进","大营路街道“治风”工作推进表", "/preview/red-white/dayinglu-tpl-4.jpg"),
    WHITE_INFORMATION_STATISTICS("5", "表九：区（市、县）信息互通统计","表九：区（市、县）信息互通统计表", "/preview/red-white/dayinglu-tpl-5.jpg"),
    RED_TRACKING_REPORT("6", "云岩区红事跟踪报备","云岩区红事跟踪报备月台账", "/preview/red-white/dayinglu-tpl-6.jpg"),
    WHITE_TRACKING_REPORT("7", "云岩区白事跟踪报备","云岩区白事跟踪报备月台账", "/preview/red-white/dayinglu-tpl-7.jpg"),
    ;

    private String code;
    private String name;
    private String fileName;
    private String img;

    RedWhiteExcel(String code, String name, String fileName, String img) {
        this.fileName = fileName;
        this.name = name;
        this.code = code;
        this.img = img;
    }

    public static String getName(String code) {
        for (RedWhiteExcel o : RedWhiteExcel.values()) {
            if (o.getCode().equals(code)) {
                return o.getName();
            }
        }
        return null;
    }

    public static RedWhiteExcel getEnum(String code) {
        for (RedWhiteExcel o : RedWhiteExcel.values()) {
            if (o.getCode().equals(code)) {
                return o;
            }
        }
        return null;
    }
}
